//
//  CRUserData.h
//  ChatRoom
//
//  Created by lee han on 12/7/12.
//  Copyright (c) 2012 lee han. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CRUserData : NSObject{
    NSMutableArray* m_collectionData;
    NSMutableDictionary* m_shopcarData;
    
    NSMutableArray* m_AddressData;
    
    NSMutableArray* m_scollData;
    
    NSMutableArray* m_homeData;
    NSMutableArray* m_expData;
}



+ (CRUserData*)sharedInstance;

//uid
@property(retain, nonatomic)NSString* m_uid;
//token
@property(retain, nonatomic)NSString* m_token;

@property(nonatomic)NSInteger m_money;


//用户名
@property(retain, nonatomic)NSString* m_landingPhone;

//密码，初始值为注册时的验证码，需md5加密
@property(retain, nonatomic)NSString* m_password;

//保存登陆信息到本地
- (void)saveLoginInfo;

//收藏
-(void)setCollectionData:(NSArray*) data;
-(BOOL)hasCollection:(NSString*)productid;
-(void)addCollection:(NSString*)productid;
-(void)removeCollection:(NSString*)productid;
-(NSInteger)CollectionCount;

//购物车
-(void)setShopCarData:(NSArray*)data;
-(void)addShopcar:(NSString*)pid count:(NSString*)count;
-(void)removeShopcar:(NSString*)pid;

//收货地址
-(void)setAddressData:(NSArray*)data;
-(NSDictionary*)getAddressData:(NSInteger)index;
-(void)delAddressData:(NSInteger)aid;
-(void)setAddressSelect:(NSInteger)aid old:(NSInteger)oldAid;
-(NSInteger)getDefaultAddressID;
-(NSInteger)getAddressCount;

//订单产品信息
@property(retain) NSMutableArray* mOrderData;
@property(retain) NSMutableDictionary* mOrderProductData;
@property NSInteger mOrderAddressID;
-(NSDictionary*)getOrderAddress;
-(NSInteger)getOrderMoney;

//首页数据
-(void)setHomeData:(NSDictionary*) data;
-(NSArray*)getScrollImage;
-(NSArray*)getScrollTitle;
-(NSDictionary*)getScrollInfo:(NSInteger)index;

-(NSArray*)getHomeData;

-(NSArray*)getExpData;
@end


